using System.Windows;
using System.Windows.Forms;
using Prism.Services.Dialogs;

namespace PrismPractice.Controls
{
	/// <summary>
	/// 要显示到第二屏的窗口
	/// </summary>
	public class SecondScreenWindow : Window, IDialogWindow
	{
		public SecondScreenWindow ()
		{
			Loaded += SecondScreenWindow_Loaded;
		}

		private void SecondScreenWindow_Loaded(object sender, RoutedEventArgs e)
		{
			MoveToSecondScreen();
		}

		private void MoveToSecondScreen()
		{
			if(Screen.AllScreens.Length > 1)
			{
				Left = Screen.PrimaryScreen.WorkingArea.Width;
			}

			WindowState = WindowState.Maximized;
		}

		/// <inheritdoc />
		public IDialogResult Result { get; set; }
	}
}
